<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户个人详情页面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        .profile-container {
            width: 100%;
            max-width: 400px;
            background: white;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            text-align: center;
        }

        .profile-header {
            margin-bottom: 20px;
        }

        .profile-header h1 {
            margin: 0;
        }

        .avatar {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            overflow: hidden;
            margin: auto;
            margin-bottom: 20px;
        }

        .avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .profile-info {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .info-group {
            width: 100%;
            margin-bottom: 20px;
            text-align: left;
        }

        .info-group label {
            display: block;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .info-group p {
            margin: 0;
            padding: 8px;
            background-color: #f9f9f9;
            border: 1px solid #ddd;
            border-radius: 4px;
            width: calc(100% - 16px); /* Adjust for padding */
        }

        button {
            background-color: #007bff;
            color: white;
            padding: 10px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            display: block;
            margin: 20px auto;
        }

        button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>

<div class="profile-container">
    <div class="profile-header">
        <h1>用户个人详情</h1>
    </div>
    <div class="avatar">
        <img src="https://via.placeholder.com/150" alt="用户头像">
    </div>
    <div class="profile-info">
        <div class="info-group">
            <label>用户id:</label>
            <p id="email">{{ request.session.user_id }}</p>
        </div>
        <div class="info-group">
            <label>姓名:</label>
            <p id="name">{{ request.session.user_name }}</p>
        </div>

        {#        <div class="info-group">#}
        {#            <label>电话号码:</label>#}
        {#            <p id="phone">1234567890</p>#}
        {#        </div>#}
        {#        <div class="info-group">#}
        {#            <label>地址:</label>#}
        {#            <p id="address">北京市朝阳区某街道123号</p>#}
        {#        </div>#}
    </div>
    <button><a href="/system/user_manage/update/{{ request.session.user_id }}">编辑个人信息</a>
    </button>
</div>

<script>
    function editProfile() {
        alert("你点击了编辑按钮！");
        // 这里可以添加跳转到编辑页面的逻辑或直接在当前页面显示编辑表单
    }
</script>

</body>
</html>